package com.swak.test.vertx;

import com.hazelcast.config.Config;

import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.core.spi.cluster.ClusterManager;
import io.vertx.spi.cluster.hazelcast.HazelcastClusterManager;

public class VertxNodeA {

	Config hazelcastConfig = new Config();
	ClusterManager mgr = new HazelcastClusterManager(hazelcastConfig);
	VertxOptions options = new VertxOptions().setClusterManager(mgr);
	Vertx vertx;

	public VertxNodeA() {
		Vertx.clusteredVertx(options, res -> {
			if (res.succeeded()) {
				this.vertx = res.result();
				this.onStart();
			} else {
			}
		});
	}
	
	public void onStart() {
	}
}
